<template>
  <div class="courseBox" >
    <div class="navTabBox">
      <div class="tabBox">
        <div
          v-for="(itemTab,indexTab) in list[leftIndex].tabList"
          :key="indexTab"
          class="tabList"
        >{{ itemTab }}</div>
      </div>
      <div v-if="list[leftIndex].tabList.length>=5" class="sreen">筛选</div>
    </div>

    <!-- 右侧班级编辑区域 -->
    <div v-if="list.length && list[leftIndex].showRight">
      <div class="editRightList">
        <!-- 头部提示区域 -->
        <header class="title">热门课程列表设置</header>
        <div class="editCon">
          <div>
            <span style="width:95px;text-align:right;display: inline-block;">添加标题：</span>
            <el-select
              v-model="list[leftIndex].tabList"
              multiple
              placeholder="请选择"
              style="width:250px;"
            >
              <el-option
                v-for="item in courseCategorys"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              />
            </el-select>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
// import { getCategoryList } from '@/api/subject/category'
// import { getTenantId } from '@/utils/auth'
// import { courseList } from '@/api/user/user' // 数据接口

export default {
  props: ['list', 'leftIndex'],
  data() {
    return {
      courseCategorys: [
        {
          label: '语文',
          value: '语文',
          id: '1'
        },
        {
          label: '数学',
          value: '数学',
          id: '2'
        },
        {
          label: '英语',
          value: '英语',
          id: '3'
        },
        {
          label: '物理',
          value: '物理',
          id: '4'
        },
        {
          label: '化学',
          value: '化学',
          id: '5'
        },
        {
          label: '生物',
          value: '生物',
          id: '6'
        }
      ]
    }
  },
  mounted() {},
  methods: {
  }
}
</script>
<style lang="scss">
.courseBox {
  .course_title {
    display: flex;
    align-items: flex-end;
    padding: 10px;

    .course_title_left {
      font-size: 16px;
      font-weight: bold;
    }

    .course_title_right {
      margin-left: 10px;
      font-size: 12px;
      color: #616161;
    }
  }
  .navTabBox {
    display: flex;
    align-items: center;
    .tabBox {
      border-top: 1px solid #eee;
      border-bottom: 1px solid #eee;
      display: flex;
      align-items: center;
      padding: 0 10px;
      overflow: auto;
      width: 100%;

      .tabList {
        // width: 20%;
        flex: 1;
        min-width: 20%;
        height: 100%;
        box-sizing: border-box;
        text-align: center;
        padding: 10px 0;
        flex-shrink: 0;
      }

      .tabList:first-child {
        border-bottom: 2px solid rgb(77, 139, 255);
      }
    }
    .sreen {
      flex-shrink: 0;
      width: 55px;
      padding: 10px 0;
      box-sizing: border-box;
      text-align: center;
      background-color: #fff;
      color: #4d8bff;
      box-shadow: -10px 0 20px #eee;
    }
  }
}

.editRightList {
  width: 400px;
  position: absolute;
  left: 105%;
  top: 0;
  padding: 10px;
  border: 1px solid #e1e1e1;
  background-color: #fafafa;

  .title {
    font-size: 14px;
    padding: 8px;
    border-bottom: 1px solid #e1e1e1;

    .help-text {
      font-size: 12px;
      color: #616161;
      margin-top: 5px;
    }
  }

  .editCon {
    background-color: #fff;
    padding: 10px 5px;
    border: 1px solid #e1e1e1;
    margin-top: 5px;
  }
}
</style>
